import { http, uploadImage } from '@/utils/http'

export function register(data) {
  return http({
    method: 'post',
    url: '/user/register',
    data,
  })
}

export function login(data) {
  return http({
    method: 'post',
    url: '/user/login',
    data,
  })
}

export function setAvatar(file) {
  return uploadImage('/user/setAvatar', file)
}
